Skip to content

feat: add OS notifications for completed/failed tasks#976

Open
yehyal wants to merge 5 commits intopingdotgg:mainfrom
yehyal:feat/notifications
Open

feat: add OS notifications for completed/failed tasks#976
yehyal wants to merge 5 commits intopingdotgg:mainfrom
yehyal:feat/notifications

Conversation

@yehyal
Copy link

@yehyal yehyal commented Mar 12, 2026

Summary

Adds OS notifications when a task completes or fails, with a user-facing toggle and a settings test button.

Why

Addresses issue
Notifications are important for backgrounded work. This keeps users in the loop without requiring the app to stay focused.

What Changed

  • Add a notifications toggle to Settings.
  • Emit OS notifications on turn completion/failure when backgrounded.
  • Add a test notification button.
  • Add unit tests for native notification helpers.

Screenshots / Video

  • settings page
Screenshot 2026-03-12 at 16 27 43
  • Demo video (notification firing):
t3code-preview-notification.mp4

Notes

  • Notifications are only sent when the app is in the background and the toggle is enabled.

Note

Add OS notifications for completed and failed background tasks

  • Adds a nativeNotifications utility library (nativeNotifications.ts) with functions to check permission, request permission, detect app backgrounding, and dispatch native notifications.
  • Notifications fire once per turn when a thread's running task transitions to completed or failed while the app is backgrounded, using the thread title or last error as the message.
  • Adds a useNotification hook to track and request Notification API permission state, refreshing on window focus.
  • Adds an enableNotifications toggle (default true) to app settings, with a settings UI for enabling/disabling notifications, viewing permission status, requesting browser permission, and sending a test notification.
  • Behavioral Change: new installs default to enableNotifications: true; users will be prompted for browser notification permission when they visit settings.

Macroscope summarized 0a1e63b.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5d1d9811-4e8f-4973-b19c-48b2ac9abd87

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable the changed files summary in the walkthrough.

Disable the reviews.changed_files_summary setting to disable the changed files summary in the walkthrough.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 12, 2026
@yehyal yehyal marked this pull request as ready for review March 12, 2026 15:37
@github-actions github-actions bot added the size:L 100-499 changed lines (additions + deletions). label Mar 12, 2026
@yehyal yehyal requested a review from juliusmarminge March 12, 2026 20:16
const previous = lastSessionByThreadRef.current.get(thread.id);

// A completed/failed turn transitions from running with an activeTurnId
// to a session with no active turn and status ready/error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also notify on input/approval requested?

also maybe have the setting be more configurable than a boolean flag so users can set more granular levels of when they wanna be notified

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to push out a mvp first for just task status notification, but I can definitely work on adding it for input/approval

can you give me a bit more info regarding fine tuning the notifications? some example scenarios / levels that you want to add

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which style do you prefer

image

Codex App current style:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants